<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ page import="hmg.common.CommonUtils"%>
<%@ page import="hmg.vo.BoardVO"%>
<%@ page import="hmg.vo.FileVO"%>
<%@ page import="java.util.List"%>
<%--
    JSP Name : jspName.jsp
    Description : 설명을 기술합니다.
    author Kim hyung soo
    since 2012. 8. 24.
    version 1.0
    Modification Information
       since          author              description
    ===========    =============    ===========================
    2012. 8. 24.     Kim hyung soo     최초 생성
--%>
<%
    BoardVO news = (BoardVO) request.getAttribute("NewsInfo");
    List<FileVO> imageList = (List<FileVO>) request.getAttribute("ImageList");

    boolean isHTML = false;

    if (news.getHTMLState().equals("Y") == true)
        isHTML = true;
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html lang="ko" xml:lang="ko" xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>뉴스 | 현대자동차그룹</title>
<meta name="description" content="현대자동차그룹 보도자료, 뉴스 게시판" />
<meta name="keywords" content="그룹소식, 계열사소식, 제품/기술, 수상/활동, 공헌/환경, 문화/예술, 기타/마케팅" />
<link rel="stylesheet" type="text/css" href="/hmg/css/web/kor/com/content.css" />
<link rel="stylesheet" type="text/css" href="/hmg/css/web/kor/com/jquery.jscrollpane.css" />
<!--[if IE 7]><link rel="stylesheet" type="text/css" href="/hmg/css/web/kor/com/ie7.css" /><![endif]-->
<script type="text/javascript" src="/hmg/js/web/kor/com/jquery-1.7.2.min.js"></script>
<script type="text/javascript" src="/hmg/js/web/kor/com/googleAnalytics.js"></script>
<style type="text/css">
    html {overflow-y:auto;}
</style>
<script type="text/javaScript">
$(document).ready(function() {
    print();
});
</script>
</head>
<body style="background:none;">
    <!--contents-->
    <div id="content">
        <!-- 내용 -->
        <div class="groupNews">
            <div class="view_table01">
                <table summary="뉴스 보기 테이블">
                <caption>뉴스 보기</caption>
                <colgroup>
                    <col width="12%" /><col width="78%" /><col width="10%" />
                </colgroup>
                <tbody>
                    <tr>
                        <th colspan="3"><%= news.getTitle() %></th>
                    </tr>
                    <tr>
                        <td colspan="2"><%= news.getCompName() %></td>
                        <td class="align_right"><%= news.getExpireDate() %></td>
                    </tr>
                    <tr>
                        <td colspan="3">
<%  if (imageList != null && imageList.size() > 0) { %>
                            <div class="viewTable_Slide">
                                <div id="gallery_wrapper">
                                    <div id="gallery_slider">
                                        <div style="overflow: hidden;" class="gallery_scroll">
                                            <div class="scrollContainer">
<%
        for (int idx = 0; idx < imageList.size(); idx++) {
            FileVO image = imageList.get(idx);
%>
                                                <div class="gallery_panel">
                                                    <img src="<%= image.getFilePath() %>" alt="" />
                                                </div>
<%      } %>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                                <div id="arrow">
                                    <span class="left"><img class="png24"src="/hmg/images/web/kor/grn/left_arrow.gif" alt="left"/></span>
                                    <span class="right"><img class="png24"src="/hmg/images/web/kor/grn/right_arrow.gif" alt="right"/></span>
                                </div>

                                <div id="thumbImg">
                                    <ul>
<%
        for (int idx = 0; idx < imageList.size(); idx++) {
            FileVO image = imageList.get(idx);

            if (idx == 0)
                out.println("                                                <li class=\"on\"><img src=\"" + image.getFilePath() + "\" alt=\"\" /></li>");
            else if (idx + 1 == imageList.size())
                out.println("                                                <li class=\"last\"><img src=\"" + image.getFilePath() + "\" alt=\"\" /></li>");
            else
                out.println("                                                <li><img src=\"" + image.getFilePath() + "\" alt=\"\" /></li>");
        }
%>
                                    </ul>
                                </div>
                            </div>
<%  } %>
                            <p><%= CommonUtils.getWebText(news.getWebContent(), isHTML) %></p>
                        </td>
                    </tr>
                </tbody>
                </table>
            </div>
        </div>
        <!--// 내용 -->
    </div>
    <!--//contents-->
</body>
</html>